/* =============================== */
/* CSS for control sap.m/CheckBox  */
/* BlueCrystal theme               */
/* =============================== */

.sapMCb.sapMCbWarn .sapMCbBg {
	background-color: @sapUiFieldWarningBackground;
	border-color: @sapUiFieldWarningColor;
	&.sapMCbMarkChecked:before {
		color: darken(@sapUiFieldWarningColor,100);
	}
}

.sapMCb.sapMCbErr .sapMCbBg {
	background-color: @sapUiFieldInvalidBackground;
	border-color: @sapUiFieldInvalidColor;
	&.sapMCbMarkChecked:before {
		color: @sapUiFieldInvalidColor;
	}
}

.sapUiForm .sapMCbBg { /* In forms, align left with '0.0625rem' ( the focus width) */
	left: 0.0625rem;
}

.sapMCbBg.sapMCbMarkChecked:before {
	color: @sapUiSelected;
}

/* CheckBox focus */
.sapMCb:focus {
	outline: none;
}

html.sap-desktop {
	.sapMCbBg:focus,
	.sapMCbBg:active,
	.sap-desktop .sapMCbBg.sapMCbBgDis:focus {
		-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
		outline: none;
	}

	.sapMCb:not(.sapMCbBgDis):not(.sapMCbHasLabel):focus > .sapMCbBg {
		outline-width: 1px;
		outline-style: dotted;
		outline-color: @sapUiContentFocusColor;
	}

	.sapMCb:not(.sapMCbBgDis).sapMCbHasLabel:focus:before {
		content: "";
		display: block;
		position: absolute;
		top: 0.6875rem;
		bottom: 0.6875rem;
		left: 0.6875rem;
		right: -1px; /* Cb in BC the outline should have offset 1px from the control */
		border: 1px dotted @sapUiContentFocusColor;
	}

	.sapUiForm .sapMCb:not(.sapMCbBgDis):focus:before {
		left: -1px; /* Cb in SimpleForm: left and right border adjustment */
		right: 1px;
	}

	.sapUiRespGrid .sapMCb:not(.sapMCbBgDis).sapMCbHasLabel:focus:before {
		right: 0; /* in the Grid the outline on the right is not visible */
	}
}

/* CheckBox in Footer Context */
.sapMFooter-CTX .sapMCb:not(.sapMCbBgDis):focus > .sapMCbBg,
.sapMFooter-CTX .sapMCb:not(.sapMCbBgDis)		> .sapMCbBg:focus {
	outline-color: @sapUiContentContrastFocusColor;
}

.sapMLIBActive .sapMCbBg,
.sapMLIBActive .sapMCbBg.sapMCbMarkChecked,
.sapMLIBActive .sapMCbBg.sapMCbBgDis,
.sapMLIBActive .sapMCbBg.sapMCbBgDis.sapMCbMarkChecked{
	border-color: @sapUiListActiveTextColor;
}

.sapMLIBActive .sapMCbBg{
	background-color: @sapUiListActiveBackground;
}

.sapMCbHoverable:hover{
	border-color: @sapUiFieldHoverBorderColor;
	background: @sapUiFieldHoverBackground;
}

.sapMCbBgDis {
	opacity: @sapUiContentDisabledOpacity;
}

.sapMLIBActive .sapMActive .sapMCbBg.sapMCbActiveStateOff.sapMCbMarkChecked:before,
.sapMLIBActive .sapMCbBg:active.sapMCbActiveStateOff.sapMCbMarkChecked:before,
.sapMLIBActive .sapMCbBg.sapMCbMarkChecked:before,
.sapMLIBActive .sapMActive .sapMCbBg.sapMCbMarkChecked:before,
.sapMLIBActive .sapMCbBg:active.sapMCbMarkChecked:before,
.sapMLIBActive .sapMCbBg.sapMCbBgDis.sapMCbMarkChecked:before{
	color: @sapUiListActiveTextColor;
}

.sapMActive .sapMCbBg.sapMCbActiveStateOff.sapMCbMarkChecked:before,
.sapMCbBg:active.sapMCbActiveStateOff.sapMCbMarkChecked:before,
.sapMActive .sapMCbBg.sapMCbMarkChecked:before,
.sapMCbBg:active.sapMCbMarkChecked:before {
	color: @sapUiSelected;
}

.sapMCbBg.sapMCbBgDis.sapMCbMarkChecked:before {
	color: fade(@sapUiSelected, 25);
}

/* Read only */
.sapMCbRo .sapMCbBg {
	border-color: @sapUiFieldBorderColor;
}

/* Compact size */
.sapUiSizeCompact {
	.sapUiForm .sapMCbBg { /* In forms, align left with '0.0625rem' ( the focus width) */
		left: 0.0625rem;
	}
}

html.sap-desktop {
	.sapUiSizeCompact {
		.sapMCb:not(.sapMCbBgDis).sapMCbHasLabel:focus:before {
			top:0.365rem;
			bottom: 0.365rem;
			left: 0.365rem;
		}

		.sapUiSimpleForm .sapMCb:not(.sapMCbBgDis):focus:before {
			left: -0.0625rem;
		}
	}
}
